#include <iostream>
using namespace std;

int r;
int x[4];
int y[4];

int main()
{
	while(cin>>r>>x[1]>>y[1]>>x[2]>>y[2]>>x[3]>>y[3]>>x[0]>>y[0])
	{
		int ans=0;
		for(int i=1;i<=3;i++)
		{
			if(r*r>=((x[i]-x[0])*(x[i]-x[0])+(y[i]-y[0])*(y[i]-y[0])))
			{
				ans++;
			}
		}
		cout<<ans<<"x"<<endl;
	}
	
	return 0;
}
